$OpenBSD: patch-Makefile_in,v 1.3 2015/12/06 20:12:42 jasper Exp $
--- Makefile.in.orig	Mon Jul 19 18:07:34 2010
+++ Makefile.in	Sun Dec  6 21:05:44 2015
@@ -13,6 +13,7 @@ LIBS = @X_LIBS@ @X_PRE_LIBS@ -Llibami -lami @XT_LIB_KL
 prefix = @prefix@
 exec_prefix = @exec_prefix@
 bindir = $(exec_prefix)/bin
+sharedir = $(exec_prefix)/share
 libdir = $(exec_prefix)/lib
 mandir = $(prefix)/man
 INSTALL = @INSTALL@
@@ -24,7 +25,7 @@ STRIPFLAG = -s
 
 PROGS = amiwm requestchoice executecmd ppmtoinfo
 
-MODULES = $(srcdir)/Background Keyboard
+MODULES =
 
 OBJS  = main.o screen.o client.o frame.o icc.o \
 		icon.o menu.o diskobject.o gram.o lex.o rc.o \
@@ -43,7 +44,7 @@ DISTFILES = README README.modules INSTALL LICENSE amiw
 
 PACKAGENAME = amiwm
 
-AMIWM_HOME = $(libdir)/amiwm
+AMIWM_HOME = $(sharedir)/amiwm
 
 all : lib_all
 	@$(MAKE) local_all
@@ -89,13 +90,11 @@ kbdlexer.c : kbdlexer.l
 
 install : $(PROGS) $(MODULES) Xsession Xsession2 Xinitrc amiwm-init
 	-mkdir -p $(AMIWM_HOME)
-	$(INSTALL) $(STRIPFLAG) requestchoice $(AMIWM_HOME)/requestchoice
-	$(INSTALL) $(STRIPFLAG) executecmd $(AMIWM_HOME)/executecmd
 	for module in $(MODULES); do \
 	  if [ "$$module" = "$(srcdir)/Background" ]; then \
 	    $(INSTALL) $$module $(AMIWM_HOME)/Background; \
 	  else \
-	    $(INSTALL) $(STRIPFLAG) $$module $(AMIWM_HOME)/$$module; \
+	    $(INSTALL) $(STRIPFLAG) $$module $(bindir)/$$module; \
 	  fi; \
 	done
 	$(INSTALL) -m 644 $(srcdir)/system.amiwmrc $(AMIWM_HOME)/system.amiwmrc
@@ -110,9 +109,8 @@ install : $(PROGS) $(MODULES) Xsession Xsession2 Xinit
 	-mkdir -p $(bindir)
 	$(INSTALL) $(STRIPFLAG) amiwm $(bindir)/amiwm
 	$(INSTALL) $(STRIPFLAG) ppmtoinfo $(bindir)/ppmtoinfo
-	$(RM) $(bindir)/requestchoice
-	$(LN_S) $(AMIWM_HOME)/requestchoice $(bindir)/requestchoice
-	-mkdir -p $(mandir)/man1
+	$(INSTALL) -s requestchoice $(bindir)/requestchoice
+	$(INSTALL) -s executecmd $(bindir)/executecmd
 	$(INSTALL) -m 644 $(srcdir)/amiwm.1 $(mandir)/man1/amiwm.1
 
 fs-install : Filesystem
